/*
 * @Author: wwssaabb
 * @Date: 2021-08-14 16:13:54
 * @LastEditTime: 2021-08-14 16:21:58
 * @FilePath: \ts_demo\demo\交叉类型注意点.ts
 */

interface Eg1 {
  name: string;
  age: number;
}
interface Eg2 {
  name: string;
  age: string;
  sex: string;
}

type Eg3 = Eg1 & Eg2;
let obj: Eg3 = {
  name: "张三",
  age: (function () {
    throw Error();
  })(), //never类型
  sex: "男",
};

export {};
